
<style>
	.middle{
		vertical-align: middle;
	}
	
	.numeric{
		text-align: right;
	}
</style>

<script>
	$('.numeric').keyup(function()
		{
		$('.numeric').autoNumeric({
			aSep:'.',
			dGroup:'3',
			aDec:',',
			vMax:'999999999999',	
			vMin:'0'
		});
		
	});
		
</script>

<h4>Jantan</h4>
<table class="table table-bordered">
	<thead>
		<tr>
			<th rowspan="2" style="vertical-align: middle; text-align: center;">Jenis Sapi</th>
			<th rowspan="2" style="vertical-align: middle; text-align: center;">Umur</th>
			<th style="vertical-align: middle; text-align: center;" rowspan="2">Dipotong</th>
			<th style="vertical-align: middle; text-align: center;" rowspan="2">Terproduksi</th>
			<th style="vertical-align: middle; text-align: center;" colspan="3">Ditolak</th>
			<th style="vertical-align: middle; text-align: center;" rowspan="2">Komentar</th>
		</tr>
		<tr>
			<th style="text-align: center;">Umur Produktif</th>
			<th style="text-align: center;">Bunting</th>
			<th style="text-align: center;">Lainnya</th>
		</tr>
	</thead>
	<tbody>
		<?php
			if($all_jenis_sapi != null)
				foreach($all_jenis_sapi as $jenis_sapi):
		?>
		
		<tr>
			<td style="vertical-align: middle; text-align: center;" rowspan="3">
				<?=$jenis_sapi['NAMA']; ?>
				<input type="hidden" id="jantan-id-jenis-sapi-<?= $id; ?>" value="<?= $jenis_sapi['ID_SAPI']; ?>">
			</td>
			
			<td>< 6 tahun</td>
			
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-dipotong-lt6-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-terproduksi-lt6-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-umur-lt6-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-bunting-lt6-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-lainnya-lt6-<?= $id; ?>"></td>
			<td><textarea id="jantan-komentar-lt6-<?= $id; ?>"></textarea></td>
		</tr>
		<tr>
			
			<td>6 - 8 tahun</td>
			
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-dipotong-bt6-8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-terproduksi-bt6-8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-umur-bt6-8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-bunting-bt6-8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-lainnya-bt6-8-<?= $id; ?>"></td>
			<td><textarea id="jantan-komentar-lt6-<?= $id; ?>"></textarea></td>
		</tr>
		<tr>
			
			<td>> 8 tahun</td>
			
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-dipotong-gt8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-terproduksi-gt8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-umur-gt8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-bunting-gt8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="jantan-lainnya-gt8-<?= $id; ?>"></td>
			<td><textarea id="jantan-komentar-gt6-<?= $id; ?>"></textarea></td>
		</tr>
		
		<?php endforeach; ?>
	</tbody>

</table>
<br>

<h4>Betina</h4>
<table class="table table-bordered">
	<thead>
		<tr>
			<th rowspan="2" style="vertical-align: middle; text-align: center;">Jenis Sapi</th>
			<th rowspan="2" style="vertical-align: middle; text-align: center;">Umur</th>
			<th style="vertical-align: middle; text-align: center;" rowspan="2">Dipotong</th>
			<th style="vertical-align: middle; text-align: center;" colspan="3">Ditolak</th>
			<th style="vertical-align: middle; text-align: center;" rowspan="2">Komentar</th>
		</tr>
		<tr>
			<th style="text-align: center;">Umur Produktif</th>
			<th style="text-align: center;">Bunting</th>
			<th style="text-align: center;">Lainnya</th>
		</tr>
	</thead>
	<tbody>
		<?php
			if($all_jenis_sapi != null)
				foreach($all_jenis_sapi as $jenis_sapi):
		?>
		
		<tr>
			<td style="vertical-align: middle; text-align: center;" rowspan="3">
				<?=$jenis_sapi['NAMA']; ?>
				<input type="hidden" id="betina-id-jenis-sapi-<?= $id; ?>" value="<?= $jenis_sapi['ID_SAPI']; ?>">
			</td>
			
			<td>< 6 tahun</td>
			
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-dipotong-lt6-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-terproduksi-lt6-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-umur-lt6-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-bunting-lt6-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-lainnya-lt6-<?= $id; ?>"></td>
			<td><textarea id="betina-komentar-lt6-<?= $id; ?>"></textarea></td>
		</tr>
		<tr>
			
			<td>6 - 8 tahun</td>
			
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-dipotong-bt6-8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-terproduksi-bt6-8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-umur-bt6-8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-bunting-bt6-8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-lainnya-bt6-8-<?= $id; ?>"></td>
			<td><textarea id="betina-komentar-lt6-<?= $id; ?>"></textarea></td>
		</tr>
		<tr>
			
			<td>> 8 tahun</td>
			
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-dipotong-gt8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-terproduksi-gt8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-umur-gt8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-bunting-gt8-<?= $id; ?>"></td>
			<td style="margin: 0 auto;"><input style="width: 40px;" class="numeric" type="text" id="betina-lainnya-gt8-<?= $id; ?>"></td>
			<td><textarea id="betina-komentar-gt6-<?= $id; ?>"></textarea></td>
		</tr>
		
		<?php endforeach; ?>
	</tbody>

</table>
